package cn.bluedot.controller;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import cn.bluedot.bean.DataBaseBody;
import cn.bluedot.bean.PageBean;
import cn.bluedot.model.SowFen;
import cn.bluedot.service.SowFenService;

/**
 * @author 作者 zg
 * @version 创建时间：2019年4月16日 上午10:47:11
 */

@Controller
@RequestMapping("/sow")
public class SowFenController {

    @Autowired
    SowFenService sowFenService;

    @RequestMapping("/selectAllSowFen")
    @ResponseBody
    public DataBaseBody selectAllSowFen(@Param("page") String page) {
        // 获取按照pb页面设置查询的对应的数据
        PageBean<SowFen> pb = sowFenService.selectAllSowFen(page, 5);
        // response返回的json数据对象
        DataBaseBody dbb = DataBaseBody.getSuccessDataBody(pb);

        return dbb;

    }

}
